package org.datascooter.test.hibernate;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.datascooter.utils.LangUtils;

@Entity
@Table(name = "t_context_test_int")
public class ContextTestClassInt implements Serializable {

	private static final long serialVersionUID = -4087169737119286586L;
	@Id
	@Column(name = "F_ID")
	private Long id;
	@Column(name = "F_STRING_VALUE")
	String stringValue;
	@Column(name = "F_LONG_VALUE")
	Long longValue;
	@Column(name = "F_BIG_DECIMAL")
	BigDecimal bigDecimalValue;
	@Column(name = "F_TIME_VALUE")
	Date timestampValue;
	@Column(name = "F_BOOLEAN_VALUE")
	Boolean booleanValue;
	@Column(name = "F_INTEGER_VALUE")
	Integer integerValue;

	public ContextTestClassInt() {
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public ContextTestClassInt(Integer size, Long id) throws UnsupportedEncodingException {
		this.id = id;
		this.stringValue = LangUtils.repeat("1", size);
		this.longValue = new Long(size);
		this.bigDecimalValue = new BigDecimal(size);
		this.timestampValue = new Date();
		this.booleanValue = new Boolean(true);
		this.integerValue = size;
	}

	public String getStringValue() {
		return stringValue;
	}

	public void setStringValue(String stringValue) {
		this.stringValue = stringValue;
	}

	public Long getLongValue() {
		return longValue;
	}

	public void setLongValue(Long longValue) {
		this.longValue = longValue;
	}

	public BigDecimal getBigDecimalValue() {
		return bigDecimalValue;
	}

	public void setBigDecimalValue(BigDecimal bigDecimalValue) {
		this.bigDecimalValue = bigDecimalValue;
	}

	public Date getTimestampValue() {
		return timestampValue;
	}

	public void setTimestampValue(Date timestampValue) {
		this.timestampValue = timestampValue;
	}

	public Boolean getBooleanValue() {
		return booleanValue;
	}

	public void setBooleanValue(Boolean booleanValue) {
		this.booleanValue = booleanValue;
	}

	public Integer getIntegerValue() {
		return integerValue;
	}

	public void setIntegerValue(Integer integerValue) {
		this.integerValue = integerValue;
	}
}
